package com.ruoyi.system.domain.module.mer;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.JdbcType;
import org.apache.poi.hpsf.Decimal;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;

/**
 * 服务商家对象 mer
 *
 * @author ruoyi
 * @date 2021-09-05
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("mer")
public class Mer implements Serializable {

    private static final long serialVersionUID = 1L;

	/**
	 * $column.columnComment
	 */
	@TableId(value = "id",type = IdType.AUTO)
	private Integer id;

	/**
	 * 总管理员id
	 */
//	private Integer userId;

	/**
	 *  所属小区id
	 */
	private Integer estateId;

	/**
	 * 商家地址
	 */
	private String address;

	/**
	 * $column.columnComment
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String shopName;

	/**
	 * 商铺编号
	 */
	private String shopNo;

	/**
	 * $column.columnComment
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String shopLogo;

	private Integer cateId;

	private Integer cateChildId;

	/**
	 * 服务电话
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String telphone;

	/**
	 * 商家类型  0 - 普通商家
	 */
	private Integer shopType;

	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String leaderName;

	/**
	 * 邮箱地址
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String email;

	/**
	 * 经度
	 */
	private BigDecimal longitude;

	/**
	 * 纬度
	 */
	private BigDecimal latitude;

	private Integer provId;

	private Integer cityId;
	/**
	 * $column.columnComment
	 */
	private Integer districtId;

	/**
	 * 商家状态
	 */
	private Integer state;


	private String provName;

	private String cityName;

	private String districtName;


	/**
	 * 添加时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	/**
	 * $column.columnComment
	 */
	private Integer serviceStar;

	/**
	 * $column.columnComment
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String keyWord;

	/**
	 * 每天的订单上限数量
	 */
	private Integer maxOrderCount;

	/**
	 *  是否是自营    0 - 其他普通商家  1-  自营商家
	 */
	private Integer isPlatform;

	private String creditCode;
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String codeImg;
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String idCardImgBefore;
	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String idCardImgAfter;

	@TableField(updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.VARCHAR)
	private String signImg;

	@TableField(exist = false)
	private String signImgPath;


	@TableField(exist = false)
	private String[] provinceArray;


	@TableField(exist = false)
	private String idCardImgBeforePath;
	@TableField(exist = false)
	private String idCardImgAfterPath;

	/**
	 * 审核状态 0 -待审核 1-  审核通过 2 - 审核失败
	 */
	private Integer checkState;
	private String checkResult;

	//分成方式
	private Integer subType;
	//商品与服务的分成比例
	private BigDecimal subRate;
//	//折扣券的分成比例
//	private BigDecimal subCouponRate;
//	private String heTongPic;

	//商家二维码
	private String qrCode;
	/**
	 *  支付费用方式  0 - 未开通 1 - 已开通
	 */
	private Integer moneyPay;

	/**
	 * 结算银行名称
	 */
	private String bankName;
	/**
	 * 结算银行卡号
	 */
	private String bankCardNo;
	/**
	 * 结算银行卡账户名（姓名）
	 */
	private String bankRealName;

	private Integer agId;

	private BigDecimal subFirstPayRate;

	/**
	 *  支付平台  0 - 微信  1 - 农商行
	 */
	private Integer payPlatform;

	/**
	 *  第三方支付商户id（农商行商户id）
	 */
	private Integer payPlatformId;

	/**
	 * 折扣  8.5=85折
	 */
	private Double discountRate;

	/**
	 * 是否有折扣  0 - 无 1 - 有折扣
	 */
	private Integer isDiscount;


	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date activeBeginTime;

	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date activeEndTime;


	@TableField(exist = false)
	private String shopLogoPath;

	@TableField(exist = false)
	private String codeImgPath;

	@TableField(exist = false)
	private List<String> idCardImgs;

	@TableField(exist = false)
	private List<String> heTongPics;

	@TableField(exist = false)
	private Integer isCheck;

	@TableField(exist = false)
	private Long productCount;

	@TableField(exist = false)
	private Long couponCount;

	@TableField(exist = false)
	private Integer isShowProduct;

	@TableField(exist = false)
	private Integer productState;

	@TableField(exist = false)
	private Integer userMpCount;

	@TableField(exist = false)
	private List<Integer> cateChildIds;

	@TableField(exist = false)
	private String beginDate;

	@TableField(exist = false)
	private String endDate;

}
